package cn.net.autocode.platform.file.viewTemplate;

public class PdfView {

    public static final String template = """
             <!DOCTYPE html>
                <html lang="en" xmlns:th="http://www.thymeleaf.org">
                	<head>
                		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                		<meta http-equiv="X-UA-Compatible" content="IE=edge">
                		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
                		<meta name="renderer" content="webkit">
                		<title>{fileName}</title>
                		<script src="/links/pdf/pdfobject.min.js"></script>
                		<style>
                			html,body{
                				width: 100%;
                				height: 100%;
                				margin: 0px;
                				padding: 0px;
                			}
                		</style>
                		<script type="text/javascript">
                			var options = {
                			  pdfOpenParams: {
                			    pagemode: "thumbs",
                			    toolbar: 0,
                			    navpanes: 0,
                			    statesbar: 0,
                			    view: "FitV",
                			    scrollbars: "0"
                			  }
                			};
                			
                			function showPdf() {
                				var url = "{contentUrl}";
                				PDFObject.embed(url, "#example1",options);
                			}
                		</script>
                		</head>
                		<body onload="showPdf()">
                			<div id="example1" style="height: 100%;"></div>
                		</body>
                </html>
            """;
}
